package com.fg.cloud.manager.entry.product.vo;

import java.io.Serializable;
import java.math.BigDecimal;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fg.cloud.common.convert.CustomBigDecimalSerialize;


/**
 * Description:简单单位类型 - 商品封装使用
 * @author around
 * @date 2017年8月20日下午1:35:38
 */
public class UnitVo implements Serializable {

	private static final long serialVersionUID = -880782145068626571L;

	/** ID */
	private Long id;

	/** 单位名称 */
	private String name;

	/** 换算数量 */
	private Integer num;
	
	/** 换算单位 */
	private Long baseUnitId;
	
	/** 自定义单价 */
	@JsonSerialize(using=CustomBigDecimalSerialize.class)
	private BigDecimal customPrice;
	
	private Boolean isActive = false;
	
	public BigDecimal getCustomPrice() {
		return customPrice;
	}

	public void setCustomPrice(BigDecimal customPrice) {
		this.customPrice = customPrice;
	}

	public Boolean getIsActive() {
		return isActive;
	}

	public void setIsActive(Boolean isActive) {
		this.isActive = isActive;
	}

	public UnitVo() {}
	
	public UnitVo(Long id, String name, Integer num) {
		super();
		this.id = id;
		this.name = name;
		this.num = num;
	}
	
	public UnitVo(Long id, String name, Integer num, Long baseUnitId) {
		this(id, name, num);
		this.baseUnitId = baseUnitId;
	}
	
	public UnitVo(Long id, String name, Integer num, BigDecimal customPrice) {
		this(id, name, num);
		this.customPrice = customPrice;
		this.isActive = true;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getNum() {
		return num;
	}

	public void setNum(Integer num) {
		this.num = num;
	}

	public Long getBaseUnitId() {
		return baseUnitId;
	}

	public void setBaseUnitId(Long baseUnitId) {
		this.baseUnitId = baseUnitId;
	}
	
}
